package com.livegoods.controller;

import com.livegoods.pojo.LivegoodsResult;
import com.livegoods.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CommentController {

    @Autowired
    private CommentService commentService;

    @RequestMapping("/comment")
    public LivegoodsResult comment(String id,int page,@RequestParam(defaultValue = "10") int size){
       return commentService.comment(id,page,size);
    }

    @PostMapping("/feelback")
    public LivegoodsResult feelback(String orderId, String feelback){

        return commentService.fellback(orderId,feelback);

    }
}
